<!DOCTYPE html>
<html layout:decorate="~{layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">

<head>
    <meta content="IE=edge" http-equiv="X-UA-Compatible"/>
    <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport"/>

    <title th:text="#{cas.login.pagetitle}">CAS Admin Login View</title>
    <link href="../../static/css/cas.css" rel="stylesheet" th:href="@{${#themes.code('cas.standard.css.file')}}"/>
</head>

<body class="login">
<main class="container mt-3 mb-3" role="main">
    <div class="row" layout:fragment="content">
        <section class="col-lg-6 offset-lg-3 col-xs-12">
            <div class="card-header text-center d-flex justify-content-center mb-4">
                <h2 class="mr-2" th:text="#{cas.login.pagetitle}">Login</h2>
                <i class="mdi mdi-shield-lock-outline"></i>
            </div>
            <form method="post" name="fm1" th:action="@{/adminlogin}">
                <div class="alert alert-error" th:if="${param.error}">Invalid credentials.</div>

                <h3 th:utext="#{screen.welcome.instructions}">Enter your Username and Password</h3>

                <section class="cas-field my-3">
                    <div class="mdc-text-field d-flex">
                        <input autocomplete="off"
                               class="mdc-text-field__input"
                               id="username"
                               name="username"
                               size="25"
                               type="text"/>
                        <label class="mdc-floating-label" for="username" th:utext="#{screen.welcome.label.netid}">Username</label>
                    </div>
                </section>

                <section class="cas-field my-3">
                    <div class="mdc-text-field mdc-text-field--with-trailing-icon d-flex caps-check">
                        <input autocomplete="off"
                               class="mdc-text-field__input"
                               id="password"
                               name="password"
                               size="25"
                               type="password"/>
                        <i class="mdi mdi-alert mdc-text-field__icon text-danger caps-warn"></i>
                        <label class="mdc-floating-label" for="password" th:utext="#{screen.welcome.label.password}">Password</label>
                    </div>
                    <div class="mdc-text-field-helper-line caps-warn">
                        <p
                                class="mdc-text-field-helper-text mdc-text-field-helper-text--persistent mdc-text-field-helper-text--validation-msg text-danger">
                            <span th:utext="#{screen.capslock.on}"/>
                        </p>
                    </div>
                </section>

                <button accesskey="l"
                        class="mdc-button mdc-button--raised"
                        th:value="#{screen.welcome.button.login}"
                        value="Login">
                    <span class="mdc-button__label" th:value="#{screen.welcome.button.login}">Login</span>
                </button>
            </form>
    </div>
    </div>
</main>
</body>
</html>